package com.fanketly.musicdiary.data

import androidx.compose.ui.graphics.Color
import com.fanketly.musicdiary.R
import com.fanketly.musicdiary.ui.theme.*

/**
Anger                红色
boredom        蓝色
empty            白色
enthusiasm       橘色
fun                绿色
happiness       黄色
hate                   深红色
love              粉色
neutral         灰色
relief                  天蓝色（偏绿）
sadness        紫色
surprise          浅绿色
worry               深紫色
 * */

val moodMap by lazy {
    MoodEnum.getMoodMap()
}

enum class MoodEnum(val mood: String, val color: Color, val image: Int) {
    ANGER("生气", Color.Red, R.drawable.ic_anger_red_48),
    BOREDOM("烦", Color.Blue, R.drawable.ic_boredom_48),
    EMPTY("无聊", White, R.drawable.ic_empty_white_48),
    ENTHUSIASM("热情", OrangeColor, R.drawable.ic_enthusiasm_48),
    FUN(    "有趣", ProgressGreen, R.drawable.ic_fun_48),
    HAPPINESS("幸福", Color.Yellow, R.drawable.ic_happiness_yellow_48),
    HAPPINESS2("开心", Color.Yellow, R.drawable.ic_happiness_yellow_48),
    HAPPINESS3("快乐", Color.Yellow, R.drawable.ic_happiness_yellow_48),
    HATE("恨", DeepRed, R.drawable.ic_hate_48),
    LOVE("爱", Pink, R.drawable.ic_love_48),
    NEUTRAL("平凡", TextGrey, R.drawable.ic_neutral_48),
    RELIEF("解压", BlueGreen, R.drawable.ic_relief_48),
    RELIEF2("放松", BlueGreen, R.drawable.ic_relief_48),
    SADNESS("悲", Purple, R.drawable.ic_sadness_48),
    SURPRISE("惊", SecondaryColor, R.drawable.ic_surprise_48),
    WORRY("担心", DeepPurple, R.drawable.ic_worry_48);

    companion object {
        /**
         *Get mood enumeration class by keyword
         **/
        fun getMoodMap(): Map<String, MoodEnum> =
            mutableMapOf<String, MoodEnum>().apply {
                values().forEach {
                    put(it.mood, it)
                }
            }
    }

}